﻿@model IEnumerable<OneoneNine.Models.Reject>

@{
    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.StudentName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Reason)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.RejectRs)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.State)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.StudentName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Reason)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.RejectRs)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.State)
                </td>
                <td>
                    @*<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |

                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>*@
                    @*<button class="btn btn-outline-danger" onclick="redirectToAnotherView('@item.StudentName')">提交</button>
                <script>
                function redirectToAnotherView(value1) {
                window.location.href = "/Examines/ExamEdit?param1=" + encodeURIComponent(value1);
                }
                </script>*@
                    <a class="btn btn-outline-danger" asp-action="Details" asp-route-id="@item.Id">查看</a>
                    <a class="btn btn-outline-danger" asp-action="Delete" asp-route-id="@item.Id">删除</a>
                </td>
            </tr>
        }
    </tbody>
</table>
